<?php

namespace backend\models;

use Yii;
use yii\base\NotSupportedException;
use yii\behaviors\TimestampBehavior;
use yii\web\IdentityInterface;
use yii\db\ActiveRecord;



/**
 * This is the model class for table "user".
 *
 * @property string $id
 * @property string $username
 * @property string $gender
 * @property string $password_hash
 * @property string $auth_key
 * @property string $mobile
 * @property string $card
 * @property integer $created_at
 * @property integer $updated_at
 * @property integer $status
 */
class User extends  ActiveRecord
{
    public $password_hash;
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'user';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['created_at', 'updated_at', 'status'], 'integer'],
            [['username'], 'string', 'max' => 10],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'username' => 'Username',
            'gender' => 'Gender',
            'password_hash' => 'Password Hash',
            'auth_key' => 'Auth Key',
            'mobile' => 'Mobile',
            'card' => 'Card',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'status' => 'Status',
        ];
    }
}
